<template>

       <el-button type="primary" @click="del()">删除</el-button>

</template>

<script>
import { mapActions, mapGetters } from "vuex";
import { successAlert, warningAlert } from "../utils/alert.js";
export default {
    
methods:{
     del(){
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
       this.$emit('del');
        }).catch(() => {
           warningAlert("删除失败")    
        });
    }
}
}
</script>

<style>

</style>